package com.woniu.jifen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 订单详细
 * @TableName t_order_detail
 */
@TableName(value ="t_order_detail")
@Data
public class TOrderDetail implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long orderNum;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 商品id
     */
    private Integer itemId;

    /**
     * 商品名称
     */
    private String itemName;

    /**
     * 商品单体价格
     */
    private BigDecimal itemPrice;

    /**
     * 购买数量
     */
    private Integer buyNum;

    /**
     * 用户手机号码
     */
    private String userTelephone;

    /**
     * 支付金额
     */
    private BigDecimal payMoney;

    /**
     * 订单类型id
     */
    private Integer orderTypeId;

    /**
     * 订单业务类型id
     */
    private Integer orderServiceId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 商品资费(及时类订单)
     */
    private BigDecimal itemCost;

    /**
     * 地址
     */
    private String itemPlace;

    /**
     * 支付积分
     */
    private Integer integral;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TOrderDetail other = (TOrderDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getItemName() == null ? other.getItemName() == null : this.getItemName().equals(other.getItemName()))
            && (this.getItemPrice() == null ? other.getItemPrice() == null : this.getItemPrice().equals(other.getItemPrice()))
            && (this.getBuyNum() == null ? other.getBuyNum() == null : this.getBuyNum().equals(other.getBuyNum()))
            && (this.getUserTelephone() == null ? other.getUserTelephone() == null : this.getUserTelephone().equals(other.getUserTelephone()))
            && (this.getPayMoney() == null ? other.getPayMoney() == null : this.getPayMoney().equals(other.getPayMoney()))
            && (this.getOrderTypeId() == null ? other.getOrderTypeId() == null : this.getOrderTypeId().equals(other.getOrderTypeId()))
            && (this.getOrderServiceId() == null ? other.getOrderServiceId() == null : this.getOrderServiceId().equals(other.getOrderServiceId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getItemCost() == null ? other.getItemCost() == null : this.getItemCost().equals(other.getItemCost()))
            && (this.getItemPlace() == null ? other.getItemPlace() == null : this.getItemPlace().equals(other.getItemPlace()))
            && (this.getIntegral() == null ? other.getIntegral() == null : this.getIntegral().equals(other.getIntegral()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getItemName() == null) ? 0 : getItemName().hashCode());
        result = prime * result + ((getItemPrice() == null) ? 0 : getItemPrice().hashCode());
        result = prime * result + ((getBuyNum() == null) ? 0 : getBuyNum().hashCode());
        result = prime * result + ((getUserTelephone() == null) ? 0 : getUserTelephone().hashCode());
        result = prime * result + ((getPayMoney() == null) ? 0 : getPayMoney().hashCode());
        result = prime * result + ((getOrderTypeId() == null) ? 0 : getOrderTypeId().hashCode());
        result = prime * result + ((getOrderServiceId() == null) ? 0 : getOrderServiceId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getItemCost() == null) ? 0 : getItemCost().hashCode());
        result = prime * result + ((getItemPlace() == null) ? 0 : getItemPlace().hashCode());
        result = prime * result + ((getIntegral() == null) ? 0 : getIntegral().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", status=").append(status);
        sb.append(", itemId=").append(itemId);
        sb.append(", itemName=").append(itemName);
        sb.append(", itemPrice=").append(itemPrice);
        sb.append(", buyNum=").append(buyNum);
        sb.append(", userTelephone=").append(userTelephone);
        sb.append(", payMoney=").append(payMoney);
        sb.append(", orderTypeId=").append(orderTypeId);
        sb.append(", orderServiceId=").append(orderServiceId);
        sb.append(", createTime=").append(createTime);
        sb.append(", itemCost=").append(itemCost);
        sb.append(", itemPlace=").append(itemPlace);
        sb.append(", integral=").append(integral);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}